package controller;

import javax.ejb.EJB;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;

import Entity.Mesa;
import EJB.Business.GestorDeAdministradorLocal;

public class MesaAdmin extends BaseController {
	private Mesa mesa;
	private String sillas = "";
	
	private @EJB GestorDeAdministradorLocal gestor;
	
	public String createMesa(){
		String res = null;
		mesa = new Mesa();
		mesa.setSillas(Integer.parseInt(sillas));
		try{
			gestor.agregarMesa(mesa);
			res = "agregarMesa.success";
		}
		catch(Exception e){
			res = "agregarMesa.failure";
		}
		
		return res;
	}

	public String getSillas() {
		return sillas;
	}

	public void setSillas(String sillas) {
		this.sillas = sillas;
	}
	
}
